#include "Item.h"


void Item::Store(const Kg& amount){
	if (amount < _weight)
		_stored += amount; 
	else _stored = _weight;
}

std::istream& operator>>(std::istream& is, Item& rhs){
	is >> rhs._id >> rhs._arrived >> rhs._weight;
	return is;
}

std::ostream& operator<<(std::ostream& os, const Item& rhs){
	os << rhs._id << " " << rhs._arrived << " " << rhs._weight;
	return os;
}
